package com.gxuwz.service;

import com.gxuwz.mapper.UserMapper;
import com.gxuwz.model.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    // 根据用户ID查询用户信息
    public User getUserByUserID(String userId) {
        return userMapper.selectUserByUserID(userId);
    }

    // 更新用户信息
    public boolean updateUser(User user) {
        return userMapper.updateUser(user) > 0;
    }
}
